#ifndef ADDNEWSAMPLE_H
#define ADDNEWSAMPLE_H

#include <QDialog>
#include <QTextCursor>
#include <QRegExp>
#include <QRegExpValidator>

#include "global.h"
#include "ConfigFileservice.h"
#include "SamplelibraryService.h"
#include "custommessagebox.h"

namespace Ui {
class AddNewSample;
}

class AddNewSample : public QDialog
{
    Q_OBJECT

public:
    explicit AddNewSample(QWidget *parent = nullptr);
    ~AddNewSample();
    /* 新建样本 */
    struct SampleStruct
    {
        QString id;
        QString sampleName;
        QString colorValue;
        QString comment;
    };
    SampleStruct newSample;
    SampleLibrary *SLDB;
    QList<QHash<QString, QString>> defaultHashList;

    void getDefaultSample();

signals:
    void newSampleInfo(AddNewSample::SampleStruct);


public slots:
    void getNewSampleInfo();
    void getSampleColor();

private:
    Ui::AddNewSample *ui;

    CustomMessageBox *cusMsg;
};

#endif // ADDNEWSAMPLE_H
